//
//  LWMeViewController.m
//  1.28  weibo
//
//  Created by mac on 15/1/30.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "LWMeViewController.h"
#import "LWProductGroup.h"
#import "LWProductArrowItme.h"
#import "LWProDuctItme.h"
#import "LWproductItmeSwitchItme.h"
#import "LWproductLableItme.h"

@implementation LWMeViewController

- (void)viewDidLoad{

    [super viewDidLoad];
    UIBarButtonItem *itme = [[UIBarButtonItem alloc] initWithTitle:@"设置" style:UIBarButtonItemStylePlain target:self action:@selector(setClick)];
    self.navigationItem.rightBarButtonItem = itme;
    
    if (self.defaultView != nil) {
        
        self.defaultView.icon = @"visitordiscover_image_profile";
        
        self.defaultView.content = @"登陆后,你的微博、相册、个人资料会显示在这里， 展示给别人";
        self.defaultView.zhuanPan.hidden = YES;
    }
    // 3.初始化所有组的数据
    [self setupGroups];
}
- (void)setupGroups
{
    // 0组
    [self setUpGroup0];
    
    // 1组
    [self setUpGroup1];
    
    // 2组
    [self setUpGroup2];
    
    // 3组
    [self setUpGroup3];
}

- (void)setUpGroup0
{
    LWProductGroup *group0 = [[LWProductGroup alloc] init];
    LWProductArrowItme *newFriend = [[LWProductArrowItme alloc] initWithIcon:@"new_friend" titile:@"新的好友"];
    newFriend.badgeValue = @"99";
    group0.itmes = @[newFriend];
    [self.datas addObject:group0];
}

- (void)setUpGroup1
{
    LWProductArrowItme *album = [[LWProductArrowItme alloc] initWithIcon:@"album" titile:@"我的相册"];
    album.subTitle = @"(100)";
    album.badgeValue = @"250";
    
    LWProductArrowItme *collect = [[LWProductArrowItme alloc] initWithIcon:@"collect" titile:@"我的收藏"];
    collect.subTitle = @"(10)";
    
    
    LWProductArrowItme *like = [[LWProductArrowItme alloc] initWithIcon:@"like" titile:@"赞"];
    like.subTitle = @"(36)";
    
    
    LWProductGroup *group1 = [[LWProductGroup alloc] init];
    group1.itmes = @[album, collect, like];
    [self.datas addObject:group1];
}

- (void)setUpGroup2
{
    LWProductArrowItme *pay = [[LWProductArrowItme alloc] initWithIcon:@"pay" titile:@"微博支付"];
    
    LWProductArrowItme *vip = [[LWProductArrowItme alloc] initWithIcon:@"vip" titile:@"个性化"];
    vip.subTitle = @"微博来源、皮肤、封面图";
    
    
    
    LWProductGroup *group2 = [[LWProductGroup alloc] init];
    group2.itmes = @[pay, vip];
    [self.datas addObject:group2];
    
}

- (void)setUpGroup3
{
    LWProductArrowItme *card = [[LWProductArrowItme alloc] initWithIcon:@"card" titile:@"我的名片"];
    
    LWProductArrowItme *draft = [[LWProductArrowItme alloc] initWithIcon:@"draft" titile:@"草稿箱"];
    
    LWProductGroup *group3 = [[LWProductGroup alloc] init];
    group3.itmes = @[card, draft];
    [self.datas addObject:group3];
    
}

- (void)setClick{

    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LWSettingViewController" bundle:nil];
    UIViewController *settingVc = [sb instantiateInitialViewController];
    settingVc.title = @"设置";
    
    [self.navigationController pushViewController:settingVc animated:YES];
    
};
@end
